<?php
function getScript($name)
{
   if($name=='booking')
   {
   ?>   
    <script type="text/javascript">
    var ajaxCart    = new ajaxLoader();
    function addOrder(f)
    {
        Talert('');
        if(f.fullname.value=='')
        {
            Talert("<?php echo getLang('Please enter your name')?>");
            f.fullname.focus();
            return false;
        }
        if(!isEmail(f.Email.value))
        {
            Talert("<?php echo getLang('Please enter your email')?>");
            f.Email.focus();
            return false;
        }
        if(f.Address.value=='')
        {
            Talert("<?php echo getLang('Please enter your address')?>");
            f.Address.focus();
            return false;
        }
        if(f.Phone.value=='')
        {
            Talert("<?php echo getLang('Please enter your phone')?>");
            f.Phone.focus();
            return false;
        }
        if(f.SpamCode.value=='')
        {
            Talert("<?php echo getLang('Please enter spam code')?>");
            f.SpamCode.focus();
            return false;
        }
        ajaxCart.init({url:f.action,func:addordersucc});
        ajaxCart.send(f,true);
        getId('butsubmit2').value='<?php echo getLang('Sending')?>...';
        return false;
    }
    function addordersucc(obj)
    {
        getId('butsubmit2').value='<?php echo getLang('Send')?>';
        if(obj.status=='ok')
        {
            getId('formbooking').innerHTML='';
        }
        else
        {
            getId('ImgSpamcode').change();
            getId('SpamCode').focus();
            getId('SpamCode').value="";
        }
        Talert(obj.msg);   
    }
    </script>
   <?
   }  
}
?>